Why is my panning drifting in Direct 2D?
I'm going through a windows tutorial for Direct 2D drawing a small picture on a render target and I decided to try to add pan and zoom capabilities. All is working mostly fine but I'm having an issue with the pan. My drawing is supposed to move in sync…
Why is my panning in Direct 2D drifting at the edge of the window?
I'm going through a windows tutorial for Direct 2D drawing a small picture on a render target and I decided to try to add pan and zoom capabilities. All is working mostly fine but I'm having an issue with the pan. My is supposed to move in sync with…
Database credential saved in memory.
Hello team, While testing thick client application. I dumped the memory from task manager and process hacker tools and I got database credentials. So How can I mitigate this issues in C++, C# and .net application. Please suggest and explain in details so…
Cannot find how to get to this "Project Defaults" section "in the General pane in the Property Pages."
On this page in the documentation, it describes a "Project Defaults" section on some ephemeral "Debug Property Pages" page in some properties setting dialog, shown below: However, the documentation gives no explanation…
setting visual studio variables, such as VC_LibraryPath_x64 (AGAIN)
I asked this question previously. I received two replies, both of which suggested that the poster had not carefully read my question (and one of which provided incorrect and irrelevant feedback). So, I am reposting. To be clear. A) I have never…
Visual Studio 2015 & 2017 doesn't recognize std
Hello, I've written simple piece of code which compiles and works perfectly on any other program which can compile and run C++, but when I try to run it from VS 2015 on my laptop or on VS 2017 from my other laptop, it won't build it - I get an error…
How to use DrvDeviceCapabilities in winddiui.h (WITH winspool.lib added but LNK2019 unresolved external symbol STILL occured )
Function DrvDeviceCapabilities(winddiui.h) should be used if I want to identify a printer's color capability according to this link. But there is always a link error (LNK2019 unresolved external symbol ) though I added winspool.lib to Library Directories…
Mitigation for Dll hijacking
Hello Team, I found dll injection in c#, .net and c++thick client applications. But to perform dll here I needed admin access. in this case I had admin access. So what will be the standard mitigation to prevent dll injection after even get the admin…
NotifyIpInterfaceChange function (netioapi.h) does not notify on manual DNS changes
I work on the c-ares open source asynchronous DNS library (https://c-ares.org) and we have recently added automatic configuration reloading when we detect a network configuration change has occurred. We get notifications properly when network…
[Asan] Getting assert on launch of application "The application was unable to start correctly(0xc0000142). Click OK to close the application."
[Asan] Getting assert on launch of application "The application was unable to start correctly(0xc0000142). Click OK to close the application." Assert Image mentioned below: image_assert.png Resolved Call Stack mentioned in Microsoft Visual…
The QueryVirtualMemoryInformation function fails in 32-bit mode because the WIN32_MEMORY_REGION_INFORMATION structure is defined incorrectly.
For the record, I have Windows 11, "Version 10.0.22631 Build 22631". The WIN32_MEMORY_REGION_INFORMATION structure is defined in "memoryapi.h" as the following: typedef struct WIN32_MEMORY_REGION_INFORMATION { PVOID…
How to detect scale factor in Windows 10 in C++
I am trying to detect the display scale factor in Windows 10 in C++. Below is the code I am using. //Code to detect scale void getDisplayScale(double &h_Scale, double &v_Scale) { //auto activeWindow = GetActiveWindow(); HWND…
Device Manager does not show 'Bus Reported Device Description'
Hi, i need the device description for my APP, but unfortunately appropriate API calls does not return anything and by investigating the device manager it does not show up either. I am searching the USB enumeration list until the correct vid pid and a…
Windows API's CreateFile with CFile gives invalid path error if used drives created with SUBST
A drive is created for a folder using SUBST command. We have a Windows application which reads contents of the and performs some operations. Application does not give any error when read the file path is from actual drive. But when try to read from drive…
How to Detect Initial DPI changes in a WPF Application while Scaling according to Per Monitor Aware in Variable Dynamic Screen Resolution?
In daily life we have to deal with a lot of different types of display size it may be mobile or may be a 4k monitor. The screen resolution vary from display to display. Here another important factor is DPI (Display per inch) which is mainly a scaling…
How do I display a transparent custom bitmap on a toolbar button in a Win32 C++ app?
I'm trying to add a button with a custom transparent bitmap to a toolbar in my Win32 C++ app. I'm using the following code to create and populate the toolbar. toolBar = CreateWindowEx(0, TOOLBARCLASSNAME, nullptr, WS_CHILD, 0, 0, 0, 0, hwnd,…
Application crash even on a try catch block
When i comment out the line GetViewsByZOrder i get the following exception: Exception thrown at 0x00007FF96E36EE19 (rpcrt4.dll) in : 0xC0000005: Access violation reading location 0x00000000094F0122. On the line if (collection->GetViewForHwnd(hwnd,…
Porting SetTransform function in DirectX 9 to DirectX 11 or 12
Iam porting an existing project with DirectX 9 to DirectX 11 or 12, I am trying to port the function SetTransform from DirectX 9, there is no reference found in DirectX 11 or 12, please kindly suggest where to find the above function and how to define…
GDI+ PrivateFontCollection::AddMemoryFont failed to load fonts
GDI+ PrivateFontCollection::AddMemoryFont fails to load fonts and returns a status of InvalidParameter = 2. I made sure that my resources were correct as I also saved them locally, but the ttf fonts are correct. What is the problem please? My code and…
Disable windows shortcuts for high contrast and mouse keys
I need to block keyboard shortcuts "alt + shift + prtscr" and "alt + shift + numlk". How to do it with LL Keyboard hook? Help much appreciated !